package com.supermarket.api.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单表
 * @author 李其伟
 * @date 2023/11/11
 */
@Data
@Entity
@Table(name = "sm_order_record")
@org.hibernate.annotations.Table(appliesTo = "sm_order_record",comment="订单表")
public class OrderRecordEntity extends BaseEntity{

    @Column(name = "order_sn", columnDefinition = " char(64) not null unique comment '订单编号' ")
    private String orderSn;
    @Column(name = "total_amount", columnDefinition = " decimal(10, 2) comment '订单总金额' ")
    private BigDecimal totalAmount;

    @Column(name = "pay_Time", columnDefinition = " datetime comment '支付时间' ")
    private Date payTime;
    @Column(name = "pay_type", columnDefinition = " int(11) comment '支付方式：0->未支付；1->微信；2->支付宝；3->其他' ")
    private Integer payType;

    @Column(name = "status", columnDefinition = " int(11) comment '订单状态：0->待付款；1->已完成；2->已关闭；3->无效订单' ")
    private Integer status;

    @Column(name = "user_id", columnDefinition = " bigint(20) not null comment '用户主键' ")
    private Long userId;
    @Column(name = "create_time", columnDefinition = " datetime comment '创建时间' ")
    private Date createTime;
    @Column(name = "delete_status", columnDefinition = " int(11) comment '删除状态：0->未删除；1->已删除' ")
    private Integer deleteStatus;
}
